(* nodes.pp *)

unit nodes;

interface

const
MaxNodesNr = 256;
type 	
   link	= ^node;
   info	= record
	     inp   : integer;
	     NextTime : integer;
	     out : integer;
	  end;	   
   node	= record
	     item : info;
	     next : link;
prev : link;
	  end;	  
var	
   NodesTab : array[1..MaxNodesNr] of node;
   NodesNr  : integer;
  
   function ReadData(fn: ShortString) : integer;
procedure print(p : link);

implementation
      function ReadData(fn : ShortString) : integer;
{procedure print(t : link);}

var
   i   : integer;
   fin : file of info;
begin  
   assign(fin, fn);
   reset(fin);
   i := 0;
   while not eof(fin) do	
   begin 
      i := i+1;
      read(fin, NodesTab[i].item);
   end;
   close(fin);
   ReadData := i;
end; { ReadData }

procedure print(p : link);
begin
   writeln(p^.item.inp, '	',p^.item.NextTime, '	', p^.item.out);
end; { print }

end.
